package com.miot.im.listener;

import org.apache.log4j.Logger;

public class Logger4jProxy {
	Logger log4j = Logger.getLogger("");
	static Logger4jProxy logger4jProxy = null;
	static byte[] syn = new byte[0];

	private Logger4jProxy(String log4jXmlPath) {
//		BasicConfigurator.configure();
//		DOMConfigurator.configure(log4jXmlPath);
	}

	public static Logger4jProxy getInstance() {
		if (logger4jProxy == null) {
			synchronized (syn) {
				if (logger4jProxy == null) {
					logger4jProxy = new Logger4jProxy("log4j.xml");
				}
			}
		}
		return logger4jProxy;
	}

	public void info(String info) {
		log4j.info(info);
	}

	public static void main(String[] args) {
		getInstance().info("iagyh");
	}

	public void error(Exception e) {
		log4j.error(e, e);
	}
	public void error(Throwable e) {
		log4j.error(e, e);
	}
}
